package com.rjwh.dingdong.client.mvp.model.impl;

import com.aishua.lib.task.AsResult;
import com.rjwh.dingdong.client.mvp.BaseModel;
import com.rjwh.dingdong.client.mvp.BasePresenter;
import com.rjwh.dingdong.client.mvp.model.IAddBabyBoundModel;
import com.rjwh.dingdong.client.network.ApiRequest;
import com.rjwh.dingdong.client.network.HttpWebServiceCallBack;

/**
 * @author Kay
 * @ClassName AddBabyBoundModel
 * @Description
 * @date 2016-7-21
 * @history 2016-7-21 author: description:
 */
public class AddBabyBoundModel extends BaseModel implements IAddBabyBoundModel, HttpWebServiceCallBack {

    public AddBabyBoundModel(BasePresenter basePresenter) {
        super(basePresenter);
    }

    @Override
    public void onServerDataAcquired(int businessType, AsResult mAsResult, boolean isRefresh) {
        if (getBasePresenter() != null) {
            getBasePresenter().onServerDataAcquired(businessType, mAsResult, isRefresh);
        }
    }

    /**
     * 添加宝宝
     *
     * @param childid
     */
    @Override
    public void doAddBabyCheck(String childid) {
        ApiRequest.addBabyCheck(childid, this);
    }
}
